﻿#region << 文件说明 >>
/*----------------------------------------------------------------
 * 命名空间：Vampirewal.ToolCenter.HttpTestHelper
 * 唯一标识：b7e90f74-755e-480b-8cf2-99cb15099950
 * 文件名：HttpTestViewModel
 * 
 * 创建者：杨程
 * 电子邮箱：235160615@qq.com
 * 创建时间：2023/12/27 16:24:11
 * 版本：V1.0.0
 * 描述：
 *
 * ----------------------------------------------------------------
 * 修改人：
 * 时间：
 * 修改说明：
 *
 * 版本：V1.0.1
 *----------------------------------------------------------------*/
#endregion << 文件说明 >>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Vampirewal.Core.Attributes;
using Vampirewal.Core.HttpClientService;
using Vampirewal.Core.Interface;
using Vampirewal.Core.SimpleMVVM;

namespace Vampirewal.ToolCenter.HttpTestHelper
{
    /// <summary>
    /// 
    /// </summary>
    [VampirewalIoCRegister("Vampirewal.ToolCenter.HttpTestHelper.HttpTestViewModel")]
    public partial class HttpTestViewModel:ViewModelBase
    {
        private IHttpClientService Http { get; set; }
        private IVampirewalCoreDialogMessage Dialog { get; set; }

        /// <summary>   
        /// 构造函数
        /// </summary>
        public HttpTestViewModel(IHttpClientService http,IVampirewalCoreDialogMessage dialog)
        {
            Http=http;
            Dialog=dialog;

            Title = "WebApi测试工具";
        }

        public override void PassData(object obj)
        {
            var response= Http.HttpGet("https://www.baidu.com");

            Dialog.ShowPopupWindow(new Core.WindoSetting.PopupWindowSetting()
            {
                Message = response.ToString(),
                OwnerWindow=WindowsManager.GetInstance().MainWindow,
                Type= Core.WindoSetting.MessageType.Information
            });
        }

        #region [     属性     ]

        #endregion

        #region [     公开方法     ]

        #endregion

        #region [     私有方法     ]

        #endregion

        #region [     Command命令     ]

        #endregion

    }
}